-
Notifications
You must be signed in to change notification settings - Fork 226
feat: added google_cloud_trace_context propagator #1408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
kaylareopelle
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ollym! 👋 Thanks for opening this PR!
I'm not familiar with Google Cloud Platform propagation needs, so someone else with more familiarity will also need to review. My fellow maintainer, @arielvalentin, brought this up in the #otel-ruby channel on CNCF Slack, and we hope to have someone else take a look at it soon.
These suggestions are more for general adherence to this repo's structure.
Could you also add this gem to the ci-contrib.yml file so the tests will run as part of the CI?
propagator/google_cloud_platform/lib/opentelemetry/propagator/google_cloud_platform.rb
Outdated
Show resolved
Hide resolved
propagator/google_cloud_platform/lib/opentelemetry/propagator/google_cloud_platform/version.rb
Outdated
Show resolved
Hide resolved
Co-authored-by: Kayla Reopelle <[email protected]>
Co-authored-by: Kayla Reopelle <[email protected]>
Co-authored-by: Kayla Reopelle <[email protected]>
Co-authored-by: Kayla Reopelle <[email protected]>
…metry-ruby-contrib into gcp-lb-propagator
|
Thanks, @kaylareopelle done |
|
Updated against |
kaylareopelle
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates, @ollym! It looks like the CI isn't able to run the tests:
rake aborted!
Don't know how to build task 'test' (See the list of available tasks with `rake --tasks`)
/home/runner/work/opentelemetry-ruby-contrib/opentelemetry-ruby-contrib/vendor/bundle/ruby/3.4.0/gems/rake-13.2.1/exe/rake:27:in '<top (required)>'
/opt/hostedtoolcache/Ruby/3.4.3/x64/bin/bundle:25:in 'Kernel#load'
/opt/hostedtoolcache/Ruby/3.4.3/x64/bin/bundle:25:in '<main>'
(See full trace by running task with --trace)
Are you able to run them locally?
|
Yea they run fine, i'm not up to speed with the CI or why it doesn't work, here's my terminal output: EDIT: I think i figured it out, giving it another go |
|
@kaylareopelle everything's now passing except Ruby 3.1 Any ideas what's wrong with RuboCop with this specific ruby version? EDIT: I think i was missing some stuff in the gemfile, have copied it from the xray propagator |
|
@ollym, nice work fixing the CI issues! 🎉 It looks like there's a few Rubocop offenses to address before we can wrap things up. |
|
@kaylareopelle hoping this fixes it |
@ollym - So close! One more offense: https://github.com/open-telemetry/opentelemetry-ruby-contrib/actions/runs/14624932201/job/41034882419?pr=1408#step:6:179 @dazuma, can you take another look at this PR? @ollym has addressed your feedback. |
|
done |
dazuma
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me! Approved.
* added google_cloud_platform propagator * leftover naming * make regex const and remove unnecessary downcase * Update CHANGELOG.md Co-authored-by: Kayla Reopelle <[email protected]> * Update Gemfile Co-authored-by: Kayla Reopelle <[email protected]> * Update README.md Co-authored-by: Kayla Reopelle <[email protected]> * Update version.rb Co-authored-by: Kayla Reopelle <[email protected]> * requested changes * refactor: Define a single ruby required version * Update opentelemetry-propagator-google_cloud_platform.gemspec * rename to GoogleCloudTraceContext * requested changes * fix tests * misunderstood * whitespace * Update README.md * try fix ci * Update version.rb * Copy gemfile from xray * fix rubocop issues * Update Gemfile --------- Co-authored-by: Kayla Reopelle <[email protected]> Co-authored-by: Daniel Azuma <[email protected]>
* added google_cloud_platform propagator * leftover naming * make regex const and remove unnecessary downcase * Update CHANGELOG.md Co-authored-by: Kayla Reopelle <[email protected]> * Update Gemfile Co-authored-by: Kayla Reopelle <[email protected]> * Update README.md Co-authored-by: Kayla Reopelle <[email protected]> * Update version.rb Co-authored-by: Kayla Reopelle <[email protected]> * requested changes * refactor: Define a single ruby required version * Update opentelemetry-propagator-google_cloud_platform.gemspec * rename to GoogleCloudTraceContext * requested changes * fix tests * misunderstood * whitespace * Update README.md * try fix ci * Update version.rb * Copy gemfile from xray * fix rubocop issues * Update Gemfile --------- Co-authored-by: Kayla Reopelle <[email protected]> Co-authored-by: Daniel Azuma <[email protected]>
The
X-Cloud-Trace-Contextheader that is used by Google Cloud predates the W3C specification. For backwards compatibility, some Google Cloud services continue to accept, generate, and propagate theX-Cloud-Trace-Contextheader. However, it is likely that these systems also support the traceparent header.The
X-Cloud-Trace-Contextheader has the following format:The fields of header are defined as follows:
TRACE_IDis a 32-character hexadecimal value representing a 128-bit number.SPAN_IDis a 64-bit decimal representation of the unsigned span ID.OPTIONSsupports 0 (parent not sampled) and 1 (parent was sampled).